<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>

<body>
    <script type="text/javascript">
        var str = 'uname:lisi;age:12;gender:male|uname:zhangsan;age:13;gender:female'
            //xML形式
        var users = str.split(',');
        console.log(users);
        //将数据解析成数组，再将数组解析成数组，从而获取每一项内容
        var jsonStr = {
            "uname": "lisi",
            "age": 18,
            "gender": "male"
        }; //json对象内部只能双引号，多个
    </script>
</body>

</html>